package com.music.service.urls.constants;

public class UrlSQLQueries {
	public final static String VIEW_ALL_URLS_OF_SONG = 
		"select url_id,url_path,state,song_id,created_member_id,valid_url,creation_date from" +
		"urls where song_id = ? && valid_url = ? && state != ?";
	
	/**
	 * Note: "?..." means array.replaced by dao to appropriate values.
	 */
	public final static String GET_URL_FOR_SONGS_FOR_MEMBER = 
		"select a.url_id,a.url_path,a.state,a.song_id,a.created_member_id,a.valid_url," +
		"a.creation_date from urls a,song_urls_r b where b.created_member_id = ? && " +
		"b.url_id = a.url_id && a.state != ? && b.song_id in (###)";
	
	
	public final static String ADD_NEW_URL_TO_SONG =
		"insert into urls(url_path,song_id,created_member_id,state,creation_date) values " +
		"(?,?,?,?,sysdate)";
	
}
